package com.zhentao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

/**
 * 海关关区表
 * @TableName customs
 */
@TableName(value ="customs")
@Data
public class Customs {
    /**
     * 
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 关区代码
     */
    private String customsCode;

    /**
     * 关区名称
     */
    private String customsName;

    /**
     * 上级关区ID
     */
    private Integer parentId;

    /**
     * 关区级别(1:总署,2:直属关,3:隶属关)
     */
    private Integer customsLevel;

    /**
     * 
     */
    private Integer isActive;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Customs other = (Customs) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCustomsCode() == null ? other.getCustomsCode() == null : this.getCustomsCode().equals(other.getCustomsCode()))
            && (this.getCustomsName() == null ? other.getCustomsName() == null : this.getCustomsName().equals(other.getCustomsName()))
            && (this.getParentId() == null ? other.getParentId() == null : this.getParentId().equals(other.getParentId()))
            && (this.getCustomsLevel() == null ? other.getCustomsLevel() == null : this.getCustomsLevel().equals(other.getCustomsLevel()))
            && (this.getIsActive() == null ? other.getIsActive() == null : this.getIsActive().equals(other.getIsActive()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCustomsCode() == null) ? 0 : getCustomsCode().hashCode());
        result = prime * result + ((getCustomsName() == null) ? 0 : getCustomsName().hashCode());
        result = prime * result + ((getParentId() == null) ? 0 : getParentId().hashCode());
        result = prime * result + ((getCustomsLevel() == null) ? 0 : getCustomsLevel().hashCode());
        result = prime * result + ((getIsActive() == null) ? 0 : getIsActive().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", customsCode=").append(customsCode);
        sb.append(", customsName=").append(customsName);
        sb.append(", parentId=").append(parentId);
        sb.append(", customsLevel=").append(customsLevel);
        sb.append(", isActive=").append(isActive);
        sb.append("]");
        return sb.toString();
    }
}